package com.zixuan.gulicollege.service_order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zixuan.gulicollege.entity.order.Order;
import com.zixuan.gulicollege.entity.ucenter.UcenterMember;

import java.util.Map;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author zixuan
 * @since 2021-05-26
 */
public interface OrderService extends IService<Order> {

    /**
     * 创建订单
     * @param courseId
     * @param userInfo
     * @return
     */
    String createOrder(String courseId, UcenterMember userInfo);

    /**
     * 根据订单号查询订单信息
     * @param orderOn
     * @return
     */
    Order getOrderInfoByOrderOn(String orderOn);

    /**
     * 根据用户信息获取订单信息
     *  @param userId
     * @param courseId
     * @return
     */
    boolean getOrderBuyByUser(String userId, String courseId);

    /**
     * 修改订单状态
     * @param params
     * @return
     */
    boolean updateOrderStatus(Map<String, String> params);
}
